package com.smartwebx.ha.dal.usebean;

import java.io.Serializable;

import com.google.common.base.Objects;
import com.smartwebx.ha.dal.usebean.abstr.AbstractStation;
import com.smartwebx.ha.dal.usebean.abstr.AbstractValue;

public class StationValue implements AbstractValue, AbstractStation,
		Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private String stcd;
	private Double val;

	public String getStcd() {
		return stcd;
	}

	public void setStcd(String stcd) {
		this.stcd = stcd;
	}

	public Double getVal() {
		return val;
	}

	public void setVal(Double val) {
		this.val = val;
	}

	@Override
	public int hashCode() {
		return Objects.hashCode(stcd, val);
	}

	@Override
	public boolean equals(Object object) {
		if (object instanceof StationValue) {
			StationValue that = (StationValue) object;
			return Objects.equal(this.stcd, that.stcd)
					&& Objects.equal(this.val, that.val);
		}
		return false;
	}

	@Override
	public String toString() {
		return Objects.toStringHelper(this).add("stcd", stcd).add("val", val)
				.toString();
	}

}
